using System;
using System.Collections.Generic;
using System.Text;

using NHibernate;
using Framework.Library.Domain;
using Framework.Library.Base;

namespace Framework.Library.DAO
{
    public partial interface IPortalTabManager : IManagerBase<PortalTab, int>
    {
		// Get Methods
		IList<PortalTab> GetByPortalID(System.Int32 portalID);
    }

    partial class PortalTabManager : ManagerBase<PortalTab, int>, IPortalTabManager
    {
		#region Constructors
		
		public PortalTabManager() : base()
        {
        }
        public PortalTabManager(INHibernateSession session) : base(session)
        {
        }
		
		#endregion
		
        #region Get Methods

		
		public IList<PortalTab> GetByPortalID(System.Int32 portalID)
        {
            ICriteria criteria = Session.GetISession().CreateCriteria(typeof(PortalTab));
			
			ICriteria portalPortalCriteria = criteria.CreateCriteria("PortalPortal");
            portalPortalCriteria.Add(NHibernate.Criterion.Expression.Eq("Id", portalID));
			
			return criteria.List<PortalTab>();
        }
		
		#endregion
    }
}